home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Collections: Amiga Public Domain Connection
/
APDC Disk #025 - Programming Languages (198x)(Amiga Public Domain Connection)(US)[m][WB].zip
/
APDC Disk #025 - Programming Languages (198x)(Amiga Public Domain Connection)(US)[m][WB].adf
/
Modula-2
/
Readme.Dok
Wrap
Text File
|
1988-03-15
|
4KB
|
118 lines
Files needed to use Modula-2:
-----------------------------
The most important file is "ALoad" which is in the c: directory. This loader
enables you to run programs compiled by the Modula-2 compiler.
This program will be started by the startup-sequence included on this disk.
The compiler makes all file references to files on a medium M2:, normally
you assign the m2 directory as this medium.
1>assign m2: AmigaLibDisk24:Modula-2/m2
In the m2 directory you find the compiler. It is divided into 10 modules, all
named M4xM.OBM. The main module is M4PM.OBM. You will find also some other
modules. The compiler itself needs AMIGABase, AMIGADOS, Clock, FileSystem,
System, Terminal and TerminalBase. Without these the compiler will not run.
The other modules give access to some Amiga libraries, but they are not
complete and are included, together with some demo programs, to give you
an idea what is possible with this system.
Use of Modula-2:
----------------
Before you use this Modula system, you should copy all files to your favorite
CLI or Workbench disk.
As explained before, you can use modula programs only through the ALoad
program. This program prompts you for a program name. Let's assume
you want to start the compiler:
At the prompt you type M4PM (attention, the loader is case sensitiv):
*M4PM
Aload will now load all the modules and display for each module a line:
f - M2:Terminal.OBM
f - M2:FileSystem.OBM
...
After all needed modules are loaded, the program will be started. The compiler
will prompt you for the name of a module you want to compile, e.g. HelloWorld:
MC68000 Modula-2 Compiler V-2.0
ETH Zuerich, IFI NW/HS/WH, 28.1.86
in> HelloWorld.MOD
The compiler will now compile your program and output a line for each Module
imported, as well as for the Modules it generates:
- M2:Terminal.SBM
- M2:AmigaDos.SBM
- M2:AmigaBase.SBM
+ M2:HelloWorld.RFM
+ M2:HelloWorld.OBM 1346
in>
As you see, the program needed the modules Terminal, AmigaDos and AmigaBase.
The suffix .SBM denotes compiled definition modules. The compiler produced two
files: HelloWorld.RFM and HelloWorld.OBM. The first file contains coded
information for debugging. Unfortunatly we couldn't include the debugger,
because it was not possible to port it to the Amiga yet. The second file
contains the code. If the program had some errors, you would get a slightly
different output:
- M2:Terminal.SBM
- M2:AmigaDos.SBM
- M2:AmigaBase.SBM
+ M2:HelloWorld.RFM errors detected
in>
You must now leave the compiler by pressing the ESCape key. You will get a
message:
Back in C, press any key
and you will hear your Amiga writeing something to disk, the error listing.
It is written on a file called M2:err.LST. But let's now assume your program
does not have errors.
After pressing a key you will see the ALoad prompt again and you can
start the compiled program by typing it's name:
*HelloWorld
You can leave ALoad by typing [CTRL-@] [RETURN] at the prompt.
WARNING: Do not compile any of the following files, otherwise you will no more
be able to run any program that uses these modules.
AmigaBase.DEF
AmigaDos.DEF
Clock.DEF
FileSystem.DEF
System.DEF
Terminal.DEF
TerminalBase.DEF
We included this definition modules, so that you can see what procedures they
export.
-------------------------------------------------------------------------------
If you have any problems or questions contact us:
Electronic-Mail:
UUCP: ...seismo!mcvax!cernvax!ethz!claudio
BITNET: K538912@CZHRZU1A
EAN: claudio@ifi.ethz.chunet
Paper-Mail:
Claudio Nieder
Kanalweg 1
CH-8610 Uster Switzerland